package com.neusoft.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.bean.PageInfo;
import com.neusoft.bean.TabBbsComment;
import com.neusoft.bean.TabBbsTopicinfo;
import com.neusoft.mapper.JieMapper;
import com.neusoft.service.IJieService;

@Service
public class IJieServiceImpl implements IJieService{

	@Autowired
	private JieMapper jieMapper;
	
	@Override
	public List<Map<String, Object>> getAllTopics() {
		// TODO Auto-generated method stub
		return jieMapper.getAllTopics();
	}

	
	/**
	 * 增加
	 */
	@Override
	public int addTopic(TabBbsTopicinfo tabBbsTopicinfo) {
		// TODO Auto-generated method stub
		return jieMapper.addTopic(tabBbsTopicinfo);
	}


	@Override
	public Map<String, Object> getTopicById(int id) {
		// TODO Auto-generated method stub
		return jieMapper.getTopicById(id);
	}


	@Override
	public List<Map<String, Object>> getCommentsById(int id) {
		// TODO Auto-generated method stub
		return jieMapper.getCommentsById(id);
	}


	@Override
	public int increase_view_count(int id) {
		// TODO Auto-generated method stub
		return jieMapper.increase_view_count(id);
	}


	@Override
	public int reply(TabBbsComment tabBbsComment) {
		// TODO Auto-generated method stub
		return jieMapper.reply(tabBbsComment);
	}


	@Override
	public int get_topic_count() {
		// TODO Auto-generated method stub
		return jieMapper.get_topic_count();
	}


	@Override
	public List<Map<String, Object>> get_paged_topics(PageInfo pageInfo) {
		// TODO Auto-generated method stub
		return jieMapper.get_paged_topics(pageInfo);
	}

}
